package com.woniuxy.dao.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 附件表
 * </p>
 *
 * @author Keep it simple
 * @since 2022-06-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class RepairAttachment implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 报修编号
     */
    @TableField("repairNum")
    private String repairnum;

    /**
     * 类型
     */
    @TableField("uploadType")
    private String uploadtype;

    /**
     * 原文件名
     */
    @TableField("oldFileName")
    private String oldfilename;

    /**
     * 现文件名
     */
    @TableField("fileName")
    private String filename;

    /**
     * 文件大小
     */
    private Long size;

    /**
     * 文件路径
     */
    @TableField("filePath")
    private String filepath;

    /**
     * 文件后缀
     */
    @TableField("fileSuffix")
    private String filesuffix;

    /**
     * 上传时间
     */
//    @TableField("createDate")
    @TableField(value = "createDate",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdate;


}
